<template>
  <div class="sjfx">
    <div class="sjfx-img">
      <img src="../../assets/banner/new_banner_patient_data_head_3.png"/>
    </div>
    <div class="sjfx-chart1">
      <div id="chart"></div>
    </div>
    <div class="sjfx-chart1 sjfx-chart1-top">
      <!-- <div id="chart1"></div> -->
      <div class="fx-title">数据分析</div>
      <div class="flex flex-left align-center fx-list">
        <span class="fx-list-s1">综合评分超过4.5</span>
        <van-progress class="fx-list-pro" pivot-text="" color="#FF4B11" :percentage="50" stroke-width="4" />
        <span class="fx-list-s2">5次</span>
      </div>
      <div class="flex flex-left align-center fx-list">
        <span class="fx-list-s1">分享次数</span>
        <van-progress class="fx-list-pro" pivot-text="" color="#FFC236" :percentage="50" stroke-width="4" />
        <span class="fx-list-s2">5次</span>
      </div>
      <div class="flex flex-left align-center fx-list">
        <span class="fx-list-s1">发送反馈</span>
        <van-progress class="fx-list-pro" pivot-text="" color="#08C68E" :percentage="50" stroke-width="4" />
        <span class="fx-list-s2">5次</span>
      </div>
      <div class="flex flex-left align-center fx-list">
        <span class="fx-list-s1">反馈</span>
        <van-progress class="fx-list-pro" pivot-text="" color="#027AFE" :percentage="50" stroke-width="4" />
        <span class="fx-list-s2">5次</span>
      </div>
    </div>
    <div class="sjfx-bot"></div>
  </div>
</template>
<script>
import {createApp} from 'vue';
import {Toast} from 'vant';

const app = createApp();
app.use(Toast);
import * as echarts from 'echarts'

let myChart;

export default {
  data() {
    return {
      isPageShow: true,
    }
  },
  created() {
  },
  mounted() {
    this.initEcharts()
  },
  methods: {
    // 折线图
    initEcharts() {
      myChart = echarts.init(document.querySelector('#chart'))
      let option = {
        title: {
          text: "分数统计"
        },
        legend: {
          right: 0,
        },
        xAxis: {
          type: 'category',
          data: ['10.15', '10.16', '10.17', '10.18', '10.19', '10.20', '10.21']
        },
        yAxis: {
          type: 'value'
        },
        series: [{
          name:"治疗进展",
          data: [50, 60, 80, 33, 46, 90, 100],
          type: 'line',
          showBackground: true,
          backgroundStyle: {
            color: 'rgba(180, 180, 180, 0.2)'
          }
        }, {
          name:"康复进展",
          data: [12, 33, 98, 33, 44, 55, 93],
          type: 'line',
          showBackground: true,
          backgroundStyle: {
            color: 'rgba(180, 180, 180, 0.2)'
          }
        }]
      }
      document.getElementById('chart').setAttribute('_echarts_instance_', '')
      myChart.setOption(option)
    }
  },
}
</script>
<style scoped>
.sjfx{
  width: 100%;
  height: 100vh;
  margin-bottom: 0px !important;
  background-color: #F1F1F1;
  overflow-y: scroll;
}
.sjfx-img{
  width: 100%;
  height: auto;
}
.sjfx-img img{
  width: 100%;
  height: auto;
  vertical-align: top;
}
.sjfx-chart1{
  width: 100%;
  height: auto;
  padding: 15px 0px 0px;
  background-color: #fff;
}
#chart {
  width: 100%;
  height: 300px;
}

#chart1 {
  width: 100%;
  height: 300px;
}

.sjfx-chart1-top{
  width: auto;
  margin-top: 15px;
  padding: 15px 15px;
}
.fx-title{
  width: 100%;
  height: auto;
  color: #333333;
  font-size: 18px;
  font-weight: 500;
  text-align: center;
  padding-bottom: 15px;
}
.fx-list{
  width: 100%;
  height: auto;
  margin-bottom: 30px;
}
.fx-list-s1{
  color: #333333;
  font-size: 14px;
  font-weight: 500;
  margin-right: 10px;
}
.fx-list-pro{
  widows: auto;
  height: auto;
  flex: 1;
}
.fx-list-s2{
  color: #333333;
  font-size: 12px;
  font-weight: 400;
  margin-left: 10px;
}

.sjfx-bot{
  width: 100%;
  height: 60px;
  background-color: #F1F1F1;
}
</style>
